package inputDemo;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.util.Scanner;

public class Demo7 {
    public static void main(String[] args) throws FileNotFoundException {
        InputStream inputStream = new FileInputStream("d:/test.txt");
        Scanner scanner = new Scanner(inputStream,"utf-8");
        while (scanner.hasNext()){
            String s = scanner.next();
            System.out.println(s);
        }
    }
}
